package news.service;

import news.dao.IQueryNewsDao;
import news.dao.QueryNewsDaoImpl;
import news.example.News;

import java.util.List;

/**
 * @author Administrator
 */
public class QueryNewsListServiceImpl implements IQueryNewsListService{
    private IQueryNewsDao iQueryNewsDao = new QueryNewsDaoImpl();
    @Override
    public List<News> findAll() {
        List<News> list = iQueryNewsDao.findAll();
        return list;
    }

    @Override
    public int calcTotalCount() {
        return iQueryNewsDao.calcTotalCount();
    }

    @Override
    public void delNews(Integer id) {
        iQueryNewsDao.delNews(id);
    }
}
